package for_all;

// -----------------------------------------------------------------------------
// Importanweisungen
import java.io.Serializable;


public class PrivateChat implements Serializable {
    
    // -------------------------------------------------------------------------
    // Variablendeklarationen
    private String user1;
    private String user2;
    
    
    // -------------------------------------------------------------------------
    // Konstruktor
    public PrivateChat (String user1, String user2) {
        
        this.user1 = user1;
        this.user2 = user2;
        
    }
    
    
    // -------------------------------------------------------------------------
    // User 1 holen
    public String getUser1 () {
        return this.user1;
    }
    
    
    // -------------------------------------------------------------------------
    // User 2 holen
    public String getUser2 () {
        return this.user2;
    }
    
    
    // -------------------------------------------------------------------------
    // 
    public informAboutNewPrivateChat getInformMessage() {
        return new informAboutNewPrivateChat(this.user1);
    }
    
    
    // -------------------------------------------------------------------------
    // 
    public RemovePrivateChat getDeleteMessage (String otherUser) {
        return new RemovePrivateChat(otherUser);
    }
    
    
    // -------------------------------------------------------------------------
    //
    public class informAboutNewPrivateChat implements Serializable { 
        public String otherUser;
        
        informAboutNewPrivateChat(String otherUser) {
            this.otherUser = otherUser;
        }
    }
    
    
    // -------------------------------------------------------------------------
    //
    public class RemovePrivateChat implements Serializable { 
        public String otherUser;
        
         RemovePrivateChat (String otherUser) {
            this.otherUser = otherUser;
        }
    }
    
}